package com.doujiang.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 评分管理对象 rating
 * 
 * @author 王伟舰
 * @date 2025-07-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Rating implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 评分ID */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 用户ID */
    private Long userId;

    /** 电影ID */
    private Long movieId;

    /** 评分（如8.5） */
    private BigDecimal score;

    /** 评分时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createdAt;

    /** $column.columnComment */
    @TableLogic
    private Long deleted;


}
